package com.hxkj.client.service;

import com.hxkj.domain.po.Article;
import com.hxkj.domain.po.Column;
import com.hxkj.domain.po.ColumnTree;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
import java.util.Map;

/**
 * @InterfaceName ColumnServiceClient
 * @Description TODO
 * @Author Mr.zheng
 * @Date 2018/6/7 11:54
 * @Version 1.0
 */
@FeignClient(name = "cms-article")
public interface ColumnServiceClient {

    /**
    * @author Mr.zheng
    * @Description saveColumn 新增文章分类
    * @Date 15:19 2018/6/7
    * @Param [column]
    * @return com.platform.common.domain.result.ResultMessageStruct
    **/
    @RequestMapping(value = "/column/save", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultDataStruct saveColumn(@RequestBody Column column) throws Exception;


    /**
    * @author Mr.zheng
    * @Description getColumnTreeList 获取文章分类树形结构列表
    * @Date 15:20 2018/6/7
    * @Param [column]
    * @return com.hxkj.domain.po.ColumnTree
    **/
    @RequestMapping(value = "/column/getlisttree", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    List<ColumnTree> getColumnTreeList(@RequestBody Column column) throws Exception;


    /**
    * @author Mr.zheng
    * @Description getColumnTreeList 关键字搜索文章分类树形结构列表
    * @Date 15:20 2018/6/7
    * @Param [column]
    * @return com.hxkj.domain.po.ColumnTree
    **/
    @RequestMapping(value = "/column/getlisttreebykeyword", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    List<ColumnTree> getColumnTreeListByKeyword(@RequestBody Column column) throws Exception;


    /**
    * @author Mr.zheng
    * @Description getShowColumnTreeList 获取文章分类树结构下拉框
    * @Date 15:20 2018/6/7
    * @Param [column]
    * @return com.hxkj.domain.po.ColumnTree
    **/
    @RequestMapping(value = "/column/getshowlisttree", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    List<ColumnTree> getShowColumnTreeList(@RequestBody Column column) throws Exception;


    /**
    * @author Mr.zheng
    * @Description getColumnList 获取文章分类下的文章列表
    * @Date 10:11 2018/6/11
    * @Param [parameterDataStruct]
    * @return com.platform.common.domain.result.ResultPageStruct<com.hxkj.domain.po.Column>
    **/
    @RequestMapping(value = "/column/getlist", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultPageStruct<Article> getColumnArticleList(@RequestBody ParameterDataStruct<Column> parameterDataStruct) throws Exception;


    /**
     * @author Mr.zheng
     * @Description getColumnList 根据条件获取文章列表
     * @Date 10:11 2018/6/11
     * @Param [parameterDataStruct]
     * @return com.platform.common.domain.result.ResultPageStruct<com.hxkj.domain.po.Column>
     **/
    @RequestMapping(value = "/column/getlistbyterms", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    List<Column> getColumnListByTerms(@RequestBody Column column) throws Exception;



    /**
    * @author Mr.zheng
    * @Description removerColumn 删除文章分类
    * @Date 15:20 2018/6/7
    * @Param [column]
    * @return com.platform.common.domain.result.ResultMessageStruct
    **/
    @RequestMapping(value = "/column/remove", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct removeColumn(@RequestBody  Column column) throws Exception;


    /**
    * @author Mr.zheng
    * @Description modifyColumn 修改文章分类
    * @Date 15:22 2018/6/7
    * @Param [column]
    * @return com.platform.common.domain.result.ResultMessageStruct
    **/
    @RequestMapping(value = "/column/modify", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct modifyColumn(@RequestBody Column column) throws Exception;

    
   /**
   * @author Mr.zheng
   * @Description modifySortNum 增加文章分类排序
   * @Date 9:48 2018/6/8
   * @Param [map]
   * @return com.platform.common.domain.result.ResultMessageStruct
   **/
    @RequestMapping(value = "/column/modifysortnum", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct modifySortNum(@RequestBody Map<String,Object> map) throws Exception;


    /**
     * @author zzx
     * @Description getChildren  获取文章分类父类下所有得子类
     * @return
     **/
    @RequestMapping(value = "/column/getChildren", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    List<Column> getChildren(@RequestBody Column column) throws Exception;

    /**
     * @author zzx
     * @Description getChildren  获取一条文章分类信息
     * @return
     **/
    @RequestMapping(value = "/column/get", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    Column getColumn(@RequestBody Column column) throws Exception;

    /**
     * 根据类型名称查找文章类型--chenfangzhou
     * @param column
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/column/getcolumnbyname", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    Column getColumnByName(@RequestBody Column column) throws Exception;


    /**
     * 查询所有分类
     * @param column
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/column/getColumnList", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultDataStruct<List<Column>> getColumnList(@RequestBody Column column) throws Exception;
    /**
     * 根据文章的分类获取整个分类信息
     * @param
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/column/getTopParentColumn", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    List<Column> getTopParentColumn(@RequestBody Column column) throws Exception;



    /**
     * 获取该站点下的分类数据
     * @param
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/column/getAllColumnList", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultDataStruct<List<Column>> getAllColumnList(@RequestBody Column column) throws Exception;


    /**
     * 根据站点及模板id获取绑定的分类列表数据
     * @param
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/column/getColumnListByTempletIds", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    List<Column> getColumnListByTempletIds(@RequestBody Column column) throws Exception;


    /**
    * @author Mr.zheng
    * @Description getColumnByTempletId 根据模板ID和站点ID去获取一条分类模拟数据
    * @Date 17:33 2018/8/16
    * @Param [column]
    * @return com.hxkj.domain.po.Column
    **/
    @RequestMapping(value = "/column/getColumnByTempletId", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultDataStruct<Column> getColumnByTempletId(@RequestBody Column column) throws Exception;

    /**
    * @author Mr.zheng
    * @Description modifyTemptId 修改模板ID
    * @Date 20:47 2018/9/13
    **/
    @RequestMapping(value = "/column/modifyTemptId", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct modifyTemptId(@RequestBody Column column) throws Exception;

}
